package com.yuhang.controller;


import com.yuhang.entity.HyMenu;
import com.yuhang.service.HyMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yuhang
 * @since 2021-04-16
 */
@RestController
@RequestMapping("/hy-menu")
public class HyMenuController {

    @Autowired
    private HyMenuService hyMenuService;

    @RequestMapping("/showMenu")
    public Map<String,Object> showMenu(){
        List<HyMenu> list = hyMenuService.selectAll();
        Map<String,Object> map = new HashMap<>();
        map.put("code",0);
        map.put("msg","");
        map.put("data",list);
        return map;
    }

}
